Polyimide foam is used as an abradable seal in sections of a compressor of a gas turbine engine. For example, the foam is mounted on a static case or vane structure. The compressor rotor includes a knife edge that contacts the foam. The knife edge abrades the foam to form a groove that provides a tight clearance and limits gas leakage.